package com.hxzy.shop.dto.auth.req;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;


@Data
public class EditAccountReq implements Serializable {
    private static final long serialVersionUID = -8536080183207008911L;

    @ApiModelProperty("账户Id")
    private Long accountId;

    @ApiModelProperty("姓名")
    @NotBlank(message = "姓名不能为空")
    private String name;

    @ApiModelProperty("电话")
    @NotBlank(message = "电话不能为空")
    @Pattern(regexp = "^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\\d{8}$", message = "手机号校验错误")
    private String phone;

    @ApiModelProperty("密码")
    @NotBlank(message = "密码不能为空")
    private String password;

    @ApiModelProperty("头像")
    private String avatar;

    @ApiModelProperty("角色Id")
    private Long roleId;

    @ApiModelProperty("sub")
    private String sub;
}
